\hypertarget{interface_tic_tac_view}{
\section{TicTacView Class Reference}
\label{interface_tic_tac_view}\index{TicTacView@{TicTacView}}
}


The main visualization view that draws the tic tac peices.  


{\ttfamily \#import $<$TicTacView.h$>$}\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
(\hyperlink{interface_tic_tac_position}{TicTacPosition} $\ast$) -\/ \hyperlink{interface_tic_tac_view_a11876e5a8f97c006a1f8927118292931}{gridIndexAtPoint:}
\begin{DoxyCompactList}\small\item\em Given a mouse position in the view, returns the equivalent tic tac toe position. \item\end{DoxyCompactList}\item 
\hypertarget{interface_tic_tac_view_af199c40980ef01f0de743f8de195a38e}{
(void) -\/ \hyperlink{interface_tic_tac_view_af199c40980ef01f0de743f8de195a38e}{newGame}}
\label{interface_tic_tac_view_af199c40980ef01f0de743f8de195a38e}

\begin{DoxyCompactList}\small\item\em Starts a new game in the context of the view. \item\end{DoxyCompactList}\item 
(void) -\/ \hyperlink{interface_tic_tac_view_aab3768093cc73243d7b12341917d2a1c}{setModel:}
\begin{DoxyCompactList}\small\item\em sets the data model to use when drawing tic tac toe \item\end{DoxyCompactList}\item 
\hypertarget{interface_tic_tac_view_aaba2308d232742fb3511d9952b04318c}{
(void) -\/ \hyperlink{interface_tic_tac_view_aaba2308d232742fb3511d9952b04318c}{updateDisplay}}
\label{interface_tic_tac_view_aaba2308d232742fb3511d9952b04318c}

\begin{DoxyCompactList}\small\item\em refreshs the screen \item\end{DoxyCompactList}\item 
(void) -\/ \hyperlink{interface_tic_tac_view_a8b8b617c1789fff041e968c9fe2860b5}{dealWithHuman:}
\begin{DoxyCompactList}\small\item\em Used internally in the view to decide what to do when a human has done something. \item\end{DoxyCompactList}\item 
(void) -\/ \hyperlink{interface_tic_tac_view_a0f9ec5fe6cac223109fd5378c859cb5c}{setIsActive:}
\begin{DoxyCompactList}\small\item\em set whether or not the view is active. If not active the view will not respond to input, and will gray out the grid. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hyperlink{interface_tic_tac_grid}{TicTacGrid} $\ast$ \hyperlink{interface_tic_tac_view_a86dd862a7e0a73f356453c4b02b2f2c4}{myGrid}
\item 
\hyperlink{interface_tic_tac_model}{TicTacModel} $\ast$ \hyperlink{interface_tic_tac_view_a3adae6cf7915ae8541fc31db921ba59b}{ticTacModel}
\item 
bool \hyperlink{interface_tic_tac_view_a84e5da8723616d4f53d32ba608d1d75c}{isActive}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
The main visualization view that draws the tic tac peices. 

\subsection{Member Function Documentation}
\hypertarget{interface_tic_tac_view_a8b8b617c1789fff041e968c9fe2860b5}{
\index{TicTacView@{TicTacView}!dealWithHuman:@{dealWithHuman:}}
\index{dealWithHuman:@{dealWithHuman:}!TicTacView@{TicTacView}}
\subsubsection[{dealWithHuman:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (void) dealWithHuman: (NSEvent$\ast$) {\em event}}}
\label{interface_tic_tac_view_a8b8b617c1789fff041e968c9fe2860b5}


Used internally in the view to decide what to do when a human has done something. 
\begin{DoxyParams}{Parameters}
\item[{\em event}]The event related to what the human did. \end{DoxyParams}
\hypertarget{interface_tic_tac_view_a11876e5a8f97c006a1f8927118292931}{
\index{TicTacView@{TicTacView}!gridIndexAtPoint:@{gridIndexAtPoint:}}
\index{gridIndexAtPoint:@{gridIndexAtPoint:}!TicTacView@{TicTacView}}
\subsubsection[{gridIndexAtPoint:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ ({\bf TicTacPosition} $\ast$) gridIndexAtPoint: (NSPoint) {\em point}}}
\label{interface_tic_tac_view_a11876e5a8f97c006a1f8927118292931}


Given a mouse position in the view, returns the equivalent tic tac toe position. 
\begin{DoxyParams}{Parameters}
\item[{\em point}]The graphic point within the view \end{DoxyParams}
\begin{DoxyReturn}{Returns}
the tic tac toe position within the grid 
\end{DoxyReturn}
\hypertarget{interface_tic_tac_view_a0f9ec5fe6cac223109fd5378c859cb5c}{
\index{TicTacView@{TicTacView}!setIsActive:@{setIsActive:}}
\index{setIsActive:@{setIsActive:}!TicTacView@{TicTacView}}
\subsubsection[{setIsActive:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (void) setIsActive: (bool) {\em active}}}
\label{interface_tic_tac_view_a0f9ec5fe6cac223109fd5378c859cb5c}


set whether or not the view is active. If not active the view will not respond to input, and will gray out the grid. 
\begin{DoxyParams}{Parameters}
\item[{\em active}]true if to allow interactivity \end{DoxyParams}
\hypertarget{interface_tic_tac_view_aab3768093cc73243d7b12341917d2a1c}{
\index{TicTacView@{TicTacView}!setModel:@{setModel:}}
\index{setModel:@{setModel:}!TicTacView@{TicTacView}}
\subsubsection[{setModel:}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (void) setModel: ({\bf TicTacModel}$\ast$) {\em model}}}
\label{interface_tic_tac_view_aab3768093cc73243d7b12341917d2a1c}


sets the data model to use when drawing tic tac toe 
\begin{DoxyParams}{Parameters}
\item[{\em model}]the tic tac model \end{DoxyParams}


\subsection{Member Data Documentation}
\hypertarget{interface_tic_tac_view_a84e5da8723616d4f53d32ba608d1d75c}{
\index{TicTacView@{TicTacView}!isActive@{isActive}}
\index{isActive@{isActive}!TicTacView@{TicTacView}}
\subsubsection[{isActive}]{\setlength{\rightskip}{0pt plus 5cm}-\/ (bool) {\bf isActive}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{interface_tic_tac_view_a84e5da8723616d4f53d32ba608d1d75c}
If active, then the view will respond to the human or computer. If not active the view grid will be grayed out, and not allow interaction. \hypertarget{interface_tic_tac_view_a86dd862a7e0a73f356453c4b02b2f2c4}{
\index{TicTacView@{TicTacView}!myGrid@{myGrid}}
\index{myGrid@{myGrid}!TicTacView@{TicTacView}}
\subsubsection[{myGrid}]{\setlength{\rightskip}{0pt plus 5cm}-\/ ({\bf TicTacGrid}$\ast$) {\bf myGrid}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{interface_tic_tac_view_a86dd862a7e0a73f356453c4b02b2f2c4}
The grid peice itself. Currently most drawing is delegated to the grid. \hypertarget{interface_tic_tac_view_a3adae6cf7915ae8541fc31db921ba59b}{
\index{TicTacView@{TicTacView}!ticTacModel@{ticTacModel}}
\index{ticTacModel@{ticTacModel}!TicTacView@{TicTacView}}
\subsubsection[{ticTacModel}]{\setlength{\rightskip}{0pt plus 5cm}-\/ ({\bf TicTacModel}$\ast$) {\bf ticTacModel}\hspace{0.3cm}{\ttfamily  \mbox{[}protected\mbox{]}}}}
\label{interface_tic_tac_view_a3adae6cf7915ae8541fc31db921ba59b}
The model used internally as a reference while drawing. 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
TicTacView.h\item 
TicTacView.m\end{DoxyCompactItemize}
